package com.rem.mp.config;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import com.baomidou.mybatisplus.extension.injector.methods.additional.InsertBatchSomeColumn;

import java.util.List;

/**
 * @author Rem
 * @date 2020/12/25
 */
public class MySqlInjector extends DefaultSqlInjector {
    @Override
    public List<AbstractMethod> getMethodList() {
        //拿到父类的getMethodList方法
        List<AbstractMethod> methodList = super.getMethodList();

        //InsertBatchSomeColumn 选装器 谨慎用 值在mysql测试过切mysql默认值不会填写
        //排除插入字段
        methodList.add(new InsertBatchSomeColumn());
        return methodList;
    }


    /**
     * 3.3.1
     */
    /*@Override
    public List<AbstractMethod> getMethodList(Class<?> mapperClass) {
        //拿到父类的getMethodList方法
        List<AbstractMethod> methodList = super.getMethodList(mapperClass);

        //InsertBatchSomeColumn 选装器 谨慎用 值在mysql测试过切mysql默认值不会填写
        //排除插入字段
        methodList.add(new InsertBatchSomeColumn());
        return methodList;
    }*/
}